function compose(f,h){
    return function(val){
        return f(h(val))
    }
}
function reverse(arr){
    return arr.reverse();
}
function first(arr){
    return arr[0]
}
let diaoyong = compose(first,reverse)
console.log(diaoyong([1,2,3,4,2,3,4,5]))